home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 48
/
Aminet 48 (2002)(GTI - Schatztruhe)[!][Apr 2002].iso
/
Aminet
/
docs
/
mags
/
AIOV55.lha
/
AIOIssue55
/
examples
/
2.1.1_lotto_simple.c
< prev
next >
Encoding:
Amiga
Atari
Commodore
DOS
FM Towns/JPY
Macintosh
Macintosh JP
Macintosh to JP
NeXTSTEP
RISC OS/Acorn
Shift JIS
UTF-8
Wrap
C/C++ Source or Header
|
1980-01-01
|
396 b
|
18 lines
#include <stdio.h>
int main(void)
{
long int secret[10];
int i = 0;
for (i = 0; i <= 9; i++) /* GOTCHA!!! Arrays _ALWAYS_ start at element 0. Always. */
{
printf("\nEnter secret number #%i: ", i);
scanf("%i", &secret[i]);
}
printf("All done. The secret numbers were:\n");
for (i = 0; i <= 9; i++) printf("\n#%i: %i", i, secret[i]);
return 0;
}